<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="utf-8">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link href="<?php echo base_url()?>css/general.css" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url()?>css/main.css" rel="stylesheet" type="text/css" />
<style >

#search_auto{border:0px solid #817FB2; position:absolute; display:none; z-index:9999; padding-left:88px;}
#search_auto li{background:#CCC; text-align:left;  cursor: pointer;}
#search_auto li.cls{text-align:right;}
#search_auto li a{display:block; padding:5px 6px; cursor:pointer; color:#666;}
#search_auto li:hover{background-color: #659CD8;; text-decoration:none; color:#000;}


#search_auto2{border:0px solid #817FB2; position:absolute; display:none; z-index:9999; padding-left:88px;}
#search_auto2 li{background:#CCC; text-align:left;  cursor: pointer;}
#search_auto2 li.cls{text-align:right;}
#search_auto2 li a{display:block; padding:5px 6px; cursor:pointer; color:#666;}
#search_auto2 li:hover{background-color: #659CD8;; text-decoration:none; color:#000;}
</style>
<script language="javascript" type="text/javascript" src="<?php echo base_url()?>js/My97DatePicker/WdatePicker.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo base_url()?>js/jquery.js"></script>
<script language="JavaScript"> var base_url = '<?php echo base_url()?>'; </script>
<script language="javascript" type="text/javascript" src="<?php echo base_url()?>js/admin.js"></script>


<script language="JavaScript"> 
<!--

//窗口大小调整
$(document).ready(function() {
  editBody();
});
$(window).resize(function(){
  editBody();
});



$(document).ready(function() {

  $('#name').focus();

  var reAdd = function(){
    window.location.href= "<?php echo site_url('shipping_list/edit')?>";
  }

  var showTab = function(){
	  $('#tabbar').find('span').removeClass().addClass('tab-back');
	  $('#basic-tab').removeClass().addClass('tab-front');
	  $('#basic-div').show().siblings('.tab-div').hide();
  }
  
  var ID = "<?php echo $editing['id']?>";

  $('#save').click(function() {//新增
    if (beforeSubmit()){
	  $('form').submit();
    }else{
      showTab();
	}
  });

  $('#saveEdit').click(function() {//新增并继续编辑
	if (beforeSubmit()){
      $('#re_edit').val('1');   
	  $('form').submit();
	}else{
      showTab();
	}
  });
  
//自动完成  
	$(function(){
			 
		$('#search_auto').css({'width':$('#shipper_search input[name="shipper"]').width()+8});
		$('#search_auto2').css({'width':$('#receiver_search input[name="receiver"]').width()+8});

		$('#shipper_search input[name="shipper"]').keyup(function(){
			$.post("<?php echo site_url('shipping_list/auto_complete')?>",{'value':$(this).val(),'type':'shipper'},function(data){
			if(data=='0') $('#search_auto').html('').css('display','none');
			else $('#search_auto').html(data).css('display','block');
			});
			});
			 
			});
			
		$('#receiver_search input[name="receiver"]').keyup(function(){
			$.post("<?php echo site_url('shipping_list/auto_complete')?>",{'value':$(this).val(),'type':'receiver'},function(data){
			if(data=='0') $('#search_auto2').html('').css('display','none');
			else $('#search_auto2').html(data).css('display','block');
			});
			});
			 
			});
 

function auto_set( input_type,name,telephone)
{

 	if ( input_type == 'shipper') {
		$('#shipper').val(name);
		$('#shipper_telephone').val(telephone);	
		$('#search_auto').fadeOut(100);
	} else {
		$('#receiver').val(name);
		$('#receiver_telephone').val(telephone);	
		$('#search_auto2').fadeOut(100);		
	}
}

//-->
</script>

</head>
<body class="x-border-layout-ct" style="position: relative;" >
<div id="msg"></div>
<div id="main-tabs" class="x-tab-panel x-border-panel" style="left: 5px; top: 0px; width: 1127px; ">

    <!-- 当前菜单 -->
    <div style="-moz-user-select: none; " id="crt-menu" class="x-tab-panel-header x-unselectable">
    <div class="x-tab-strip-wrap">
    <ul  class="x-tab-strip x-tab-strip-top">
    <li class="x-tab-strip-active" >
    <a class="x-tab-right" href="#" onClick="return false;">
    <em class="x-tab-left">
    <span style="width: 130px;" class="x-tab-strip-inner">
    <span class="x-tab-strip-text"><?php echo $header_text; ?></span>
    </span>
    </em>
    </a>
    </li>
    <li  class="x-tab-edge"></li>
    <div  class="x-clear"></div>
    </ul>
    </div>
    </div>

    <!-- 工具栏 -->
    <div id="tool" class="x-panel-tbar x-panel-tbar-noheader"><div  class="x-toolbar "><table cellspacing="0"><tbody><tr>
	
	<td id="save"><table class="x-btn-wrap x-btn x-btn-text-icon button" border="0" cellpadding="0" cellspacing="0" ><tbody><tr>
	<td class="x-btn-left"><i>&nbsp;</i></td>
	<td class="x-btn-center"><em ><button class="x-btn-text tb-save" type="button">保存</button></em></td>
	<td class="x-btn-right"><i>&nbsp;</i></td>
	</tr></tbody></table></td>

	<td><span class="ytb-sep"></span></td>

	<td id="saveEdit">&nbsp;</td>

	<td><span class="ytb-sep"></span></td>

	<td id="reset"><table  class="x-btn-wrap x-btn x-btn-text-icon button" border="0" cellpadding="0" cellspacing="0" ><tbody><tr>
	<td class="x-btn-left"><i>&nbsp;</i></td>
	<td class="x-btn-center"><em ><button class="x-btn-text tb-resume" type="button">重置</button></em></td>
	<td class="x-btn-right"><i></i></td>
	</tr></tbody></table></td>

	<td><span  class="ytb-sep"></span></td>

	<td  onClick="window.location.href='<?php echo site_url('shipping_list')?>'"><table   class="x-btn-wrap x-btn x-btn-text-icon button" border="0" cellpadding="0" cellspacing="0" ><tbody><tr>
	<td class="x-btn-left"><i>&nbsp;</i></td>
	<td class="x-btn-center"><em ><button  class="x-btn-text tb-owner" type="button">列表</button></em></td>
	<td class="x-btn-right"><i></i></td>
	</tr></tbody></table></td>

	</tr></tbody></table></div></div>
    <!-- /工具栏 -->
	  <form style="padding: 5px 5px 0pt; width: ;" class=" x-form" method="post" action="<?php echo site_url('shipping_list/save')?>"  id="form" enctype="multipart/form-data" >
    <!-- 表单 -->
	<div id="menu-body" class="x-panel-body x-panel-body-noheader x-panel-body-noborder x-border-layout-ct " style="overflow:auto">

      



	  
 <div  class="x-panel x-form-label-left " >
 <div  class="x-panel x-panel-noborder" style="padding: 10px 10px 0px;">
	  <div  class="x-panel-bwrap">
	  <div  class="x-panel-body x-panel-body-noheader x-panel-body-noborder ">
	  <div class="bottomLine" id="tabbar"  style="font-size:16px; font-weight:bold;" >托运单基本信息</div>
	  </div>
	  </div>
	  </div>
	  <div  class="x-panel-bwrap form-padding"> 

	  <input  name="re_edit" id="re_edit" type="hidden" value="0" >
	  <input name="id" id="id" type="hidden" value="<?php echo $editing['id']?>" >
      
	  <div id="basic-div" class="tab-div" style="display:block">
		 
		  <div class="x-form-item x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">托运单号:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field x-form-required" size="20"  name="shipping_no" id="shipping_no" type="text" value="<?php echo $editing['shipping_no']?>" >
		  </div>
		  
	      </div>

		  <div class="x-form-item x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">托运日期:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field x-form-required" size="20"  name="operate_datetime" id="operate_datetime" type="text" value="<?php echo $editing['operate_datetime']?>" onFocus="WdatePicker({el:'operate_datetime',dateFmt:'yyyy年MM月dd日'})"  > 
		  </div>
		  
	      </div>
		  
	       
		  <div class="x-form-item x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">发站:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  		  <select name='checkin_site'  style="width:160px;height:26px;" class="x-form-field  x-form-text x-form-required">
		   <?php foreach($checkedin_site as $value) :  ?>
		  <option value='<?php echo $value['id'];  ?>' <?php  if($value['id']==$editing['checkin_site']) echo 'selected=selected'?>  ><?php echo $value['name'];  ?></option>
		  <?php endforeach; ?>
		  </select>  
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div>		  
<div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">到站:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <select name='destination_site'  style="width:160px;height:26px;" class="x-form-field  x-form-text x-form-required">
		   <?php foreach($destination_site as $value) :  ?>
		  <option value='<?php echo $value['id'];  ?>' <?php  if($value['id']==$editing['destination_site']) echo 'selected=selected'?>  ><?php echo $value['name'];  ?></option>
		  <?php endforeach; ?>
		  </select> 
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div>          
<div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">中转站:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		 		  <select name='transfer_station'  style="width:160px;height:26px;" class="x-form-field  x-form-text ">
                  <option value=""></option>
		   <?php foreach($transfer_station as $value) :  ?>
		  <option value='<?php echo $value['id'];  ?>' <?php  if($value['id']==$editing['transfer_station']) echo 'selected=selected'?>  ><?php echo $value['name'];  ?></option>
		  <?php endforeach; ?>
		  </select> 
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div>
<div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">服务方式:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <select name='delivery_methmod'  style="width:160px;height:26px;" class="x-form-field  x-form-text x-form-required">
		   <?php foreach($delivery_methmod as $value) :  ?>
		  <option value='<?php echo $value['id'];  ?>' <?php  if($value['id']==$editing['delivery_methmod']) echo 'selected=selected'?>  ><?php echo $value['name'];  ?></option>
		  <?php endforeach; ?>
		  </select> 
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div>
		  <div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">开票人:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <select name='operator'  style="width:160px;height:26px;" class="x-form-field  x-form-text x-form-required">
		   <?php foreach($user as $value) :  ?>
		  <option value='<?php echo $value['id'];  ?>' <?php  if($value['id']==$editing['operator']) echo 'selected=selected'?>  ><?php echo $value['fullname'];  ?></option>
		  <?php endforeach; ?>
		  </select> 
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div>
          
<div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">备注:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field " size="20"  name="demo" id="demo" type="text" value="<?php echo $editing['demo']?>" > 
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div>          
		  


	  

  	    


      </div>
      </div>     
      
      
      
      
      <div  class="x-panel x-panel-noborder" style="padding: 10px 10px 0px;">
	  <div  class="x-panel-bwrap">
	  <div  class="x-panel-body x-panel-body-noheader x-panel-body-noborder ">
	  <div class="bottomLine" id="tabbar"  style="font-size:16px; font-weight:bold;" >发、收货人信息</div>
	  </div>
	  </div>
	  </div>

	
	  <div  class="x-panel-bwrap form-padding"> 
   
	  <div id="basic-div" class="tab-div" style="display:block">
		  
		  <div class="x-form-item x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">发货人姓名:</label>
		  <div class="x-form-element"  style="padding-left: 80px;"  name="shipper_search" id="shipper_search">
		  <input style="width: 160px;" class="x-form-text x-form-field " size="20"  name="shipper" id="shipper" type="text" value="<?php echo $editing['shipper']?>" >
                   
		  </div>
          <div id="search_auto"></div>
		  <div class="x-form-clear-left"></div>
	      </div>

		  <div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">发货人电话:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field x-form-required" size="20"  name="shipper_telephone" id="shipper_telephone" type="text" value="<?php echo $editing['shipper_telephone']?>" > 
		  </div>
		  <div class="x-form-clear-left"></div>
		  
	      </div>
		  
	       
		  <div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">收货人姓名:</label>
		  <div class="x-form-element"  style="padding-left: 80px;" name="receiver_search" id="receiver_search" >
		  <input style="width: 160px;" class="x-form-text x-form-field" size="20"  name="receiver" id="receiver" type="text" value="<?php echo $editing['receiver']?>" > 
		  </div>
          <div id="search_auto2"></div>
		  <div class="x-form-clear-left"></div>		  
		  </div>		  
		  <div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">收货人电话:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field x-form-required x-form-mobile" size="20"  name="receiver_telephone" id="receiver_telephone" type="text" value="<?php echo $editing['receiver_telephone']?>" > 
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div>
		  

	 
	
 


	  

  	    

	 
      </div>

<!-- -->


    

      

	  


<!-- -->

    
</div>

<div  class="x-panel x-panel-noborder" style="padding: 10px 10px 0px;">
	  <div  class="x-panel-bwrap">
	  <div  class="x-panel-body x-panel-body-noheader x-panel-body-noborder ">
	  <div class="bottomLine" id="tabbar"  style="font-size:16px; font-weight:bold;" >货物信息</div>
	  </div>
	  </div>
	  </div>
      
      
<div  class="x-panel-bwrap form-padding"> 
	 
	  
	  <div id="basic-div" class="tab-div" style="display:block">
		  
		  <div class="x-form-item x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">货物名称:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field" size="20"  name="goods_name" id="goods_name" type="text" value="<?php echo $editing['goods_name']?>" >
		  </div>
		  <div class="x-form-clear-left"></div>
	      </div>

		  <div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">货物件数:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field x-form-required" size="20"  name="goods_num" id="goods_num" type="text" value="<?php echo $editing['goods_num']?>" > 
		  </div>
		  <div class="x-form-clear-left"></div>
		  
	      </div>
		  
	       
		  <div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">货物包数:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field " size="20"  name="goods_packet_num" id="goods_packet_num" type="text" value="<?php echo $editing['goods_packet_num']?>" > 
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div>		  
		  <div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">货物价值:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field " size="20"  name="goods_value" id="goods_value" type="text" value="<?php echo $editing['goods_value']?>" > 
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div>
		  

	 
	
 


	  

  	    
 </div> 
      
      
      



           
</div>




<div  class="x-panel x-panel-noborder" style="padding: 10px 10px 0px;">
	  <div  class="x-panel-bwrap">
	  <div  class="x-panel-body x-panel-body-noheader x-panel-body-noborder ">
	  <div class="bottomLine" id="tabbar"  style="font-size:16px; font-weight:bold;" >运费信息</div>
	  </div>
	  </div>
	  </div>
<div  class="x-panel-bwrap form-padding"> 

   
	  <div id="basic-div" class="tab-div" style="display:block">
		  
		  <div class="x-form-item x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">付款方式:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <select name='payment_mode'  style="width:160px;height:26px;" class="x-form-field  x-form-text x-form-required">
		   <?php foreach($payment_mode as $value) :  ?>
		  <option value='<?php echo $value['id'];  ?>' <?php  if($value['id']==$editing['id']) echo 'selected=selected'?>  ><?php echo $value['name'];  ?></option>
		  <?php endforeach; ?>
		  </select>
		  </div>
		  <div class="x-form-clear-left"></div>
	      </div>

		  <div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">运费:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field x-form-required  x-form-num" size="20"  name="freight" id="freight" type="text" value="<?php echo $editing['freight']?>" > 
		  </div>
		  <div class="x-form-clear-left"></div>
		  
	      </div>
		  
	       
		  <div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">代收货款:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field  x-form-num" size="20"  name="cod_fee" id="cod_fee" type="text" value="<?php echo $editing['cod_fee']?>" > 
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div>
          <div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">实际代收货款:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field  x-form-num" size="20"  name="actual_fee" id="actual_fee" type="text" value="<?php echo $editing['actual_fee']?>" > 
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div>		  
		  <div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">中转费:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field  x-form-num" size="20"  name="transfer_fee" id="transfer_fee" type="text" value="<?php echo $editing['transfer_fee']?>" > 
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div><div class="x-form-item  x-form-double" >
		  <label  style="width: 85px;color:dimgray;" class="x-form-item-label">送货费:</label>
		  <div class="x-form-element"  style="padding-left: 80px;">
		  <input style="width: 160px;" class="x-form-text x-form-field  x-form-num" size="20"  name="v_fee" id="transfer_fee" type="text" value="<?php echo $editing['v_fee']?>" > 
		  </div>
		  <div class="x-form-clear-left"></div>		  
		  </div>
		  

	 
	
 


	  

  	    

	  </form>
      </div>
</body>
</html>
